import type { Isystemstorestaff } from "./entity";
import type { IPageParams } from "@/types/table";
import request from "@/api/request";

export function getPageList(params: IPageParams) {
  return request({
    url: "/admin/system/store/staff/list",
    method: "get",
    params,
    loading: true,
  });
}

export function storestaffDel(data) {
  return request({
    url: `admin/system/store/staff/delete`,
    method: "post",
    data,
  });
}
export function storestaffinfo(id: number) {
  return request({
    url: `admin/system/store/staff/info`,
    method: "get",
    params: { id }
  });
}
export function storestaffSelect(id) {
  return request({
    url: `admin/system/store/staff/select`,
    method: "get",
  });
}
/**
 * 提货点分页列表
 * @param pram
 */
export function storeListApi<T>(data: any) {
  return request({
    url: '/admin/system/store/list',
    params: data,
    method: "get"
  })
}

export function storestaffAddup(data) {
  return request({
    url: `admin/system/store/staff/${!data.id ? "save" : "update"}`,
    method: "post",
    params: data
  });
}
